import 'package:logger/logger.dart';

class LogUtils {
  static final logger = Logger(
    printer: PrettyPrinter(
      methodCount: 1,
      lineLength: 1024,
      printTime: true,
    ),
  );

  static const tag = 'little_painter logger:';

  static t(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.t('$tag: $message');
  }

  static d(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.d('$tag $message');
  }

  static i(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.i('$tag: $message');
  }

  static w(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.w('$tag: $message');
  }

  static e(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.e('$tag: $message');
  }

  static f(
    dynamic message, {
    DateTime? time,
    Object? error,
    StackTrace? stackTrace,
  }) {
    logger.f('$tag: $message');
  }
}
